home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / J-M / Key messages.cpt / Key messages / card_2822.txt < prev    next >
Text File  |  1989-04-06  |  12KB  |  555 lines

  1. -- card: 2822 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2753
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 8002
  11. -- rect: left=48 top=150 right=169 bottom=66
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: a
  20.  
  21.  
  22. -- part 6 (button)
  23. -- low flags: 00
  24. -- high flags: 8002
  25. -- rect: left=68 top=150 right=169 bottom=86
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: s
  34.  
  35.  
  36. -- part 7 (button)
  37. -- low flags: 00
  38. -- high flags: 8002
  39. -- rect: left=88 top=150 right=169 bottom=106
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 1
  43. -- font id: 0
  44. -- text size: 12
  45. -- style flags: 0
  46. -- line height: 16
  47. -- part name: d
  48.  
  49.  
  50. -- part 8 (button)
  51. -- low flags: 00
  52. -- high flags: 8002
  53. -- rect: left=108 top=150 right=169 bottom=126
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 0
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: f
  62.  
  63.  
  64. -- part 9 (button)
  65. -- low flags: 00
  66. -- high flags: 8002
  67. -- rect: left=128 top=150 right=169 bottom=146
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 0 / 0
  70. -- text alignment: 1
  71. -- font id: 0
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: g
  76.  
  77.  
  78. -- part 10 (button)
  79. -- low flags: 00
  80. -- high flags: 8002
  81. -- rect: left=148 top=150 right=169 bottom=166
  82. -- title width / last selected line: 0
  83. -- icon id / first selected line: 0 / 0
  84. -- text alignment: 1
  85. -- font id: 0
  86. -- text size: 12
  87. -- style flags: 0
  88. -- line height: 16
  89. -- part name: h
  90.  
  91.  
  92. -- part 11 (button)
  93. -- low flags: 00
  94. -- high flags: 8002
  95. -- rect: left=168 top=150 right=169 bottom=186
  96. -- title width / last selected line: 0
  97. -- icon id / first selected line: 0 / 0
  98. -- text alignment: 1
  99. -- font id: 0
  100. -- text size: 12
  101. -- style flags: 0
  102. -- line height: 16
  103. -- part name: j
  104.  
  105.  
  106. -- part 12 (button)
  107. -- low flags: 00
  108. -- high flags: 8002
  109. -- rect: left=188 top=150 right=169 bottom=206
  110. -- title width / last selected line: 0
  111. -- icon id / first selected line: 0 / 0
  112. -- text alignment: 1
  113. -- font id: 0
  114. -- text size: 12
  115. -- style flags: 0
  116. -- line height: 16
  117. -- part name: k
  118.  
  119.  
  120. -- part 13 (button)
  121. -- low flags: 00
  122. -- high flags: 8002
  123. -- rect: left=208 top=150 right=169 bottom=226
  124. -- title width / last selected line: 0
  125. -- icon id / first selected line: 0 / 0
  126. -- text alignment: 1
  127. -- font id: 0
  128. -- text size: 12
  129. -- style flags: 0
  130. -- line height: 16
  131. -- part name: l
  132.  
  133.  
  134. -- part 14 (button)
  135. -- low flags: 00
  136. -- high flags: 8002
  137. -- rect: left=228 top=150 right=169 bottom=246
  138. -- title width / last selected line: 0
  139. -- icon id / first selected line: 0 / 0
  140. -- text alignment: 1
  141. -- font id: 0
  142. -- text size: 12
  143. -- style flags: 0
  144. -- line height: 16
  145. -- part name: ;
  146.  
  147.  
  148. -- part 15 (button)
  149. -- low flags: 00
  150. -- high flags: 8002
  151. -- rect: left=39 top=129 right=148 bottom=57
  152. -- title width / last selected line: 0
  153. -- icon id / first selected line: 0 / 0
  154. -- text alignment: 1
  155. -- font id: 0
  156. -- text size: 12
  157. -- style flags: 0
  158. -- line height: 16
  159. -- part name: q
  160.  
  161.  
  162. -- part 16 (button)
  163. -- low flags: 00
  164. -- high flags: 8002
  165. -- rect: left=59 top=129 right=148 bottom=77
  166. -- title width / last selected line: 0
  167. -- icon id / first selected line: 0 / 0
  168. -- text alignment: 1
  169. -- font id: 0
  170. -- text size: 12
  171. -- style flags: 0
  172. -- line height: 16
  173. -- part name: w
  174.  
  175.  
  176. -- part 17 (button)
  177. -- low flags: 00
  178. -- high flags: 8002
  179. -- rect: left=79 top=129 right=148 bottom=97
  180. -- title width / last selected line: 0
  181. -- icon id / first selected line: 0 / 0
  182. -- text alignment: 1
  183. -- font id: 0
  184. -- text size: 12
  185. -- style flags: 0
  186. -- line height: 16
  187. -- part name: e
  188.  
  189.  
  190. -- part 18 (button)
  191. -- low flags: 00
  192. -- high flags: 8002
  193. -- rect: left=99 top=129 right=148 bottom=117
  194. -- title width / last selected line: 0
  195. -- icon id / first selected line: 0 / 0
  196. -- text alignment: 1
  197. -- font id: 0
  198. -- text size: 12
  199. -- style flags: 0
  200. -- line height: 16
  201. -- part name: r
  202.  
  203.  
  204. -- part 19 (button)
  205. -- low flags: 00
  206. -- high flags: 8002
  207. -- rect: left=119 top=129 right=148 bottom=137
  208. -- title width / last selected line: 0
  209. -- icon id / first selected line: 0 / 0
  210. -- text alignment: 1
  211. -- font id: 0
  212. -- text size: 12
  213. -- style flags: 0
  214. -- line height: 16
  215. -- part name: t
  216.  
  217.  
  218. -- part 20 (button)
  219. -- low flags: 00
  220. -- high flags: 8002
  221. -- rect: left=139 top=129 right=148 bottom=157
  222. -- title width / last selected line: 0
  223. -- icon id / first selected line: 0 / 0
  224. -- text alignment: 1
  225. -- font id: 0
  226. -- text size: 12
  227. -- style flags: 0
  228. -- line height: 16
  229. -- part name: y
  230.  
  231.  
  232. -- part 21 (button)
  233. -- low flags: 00
  234. -- high flags: 8002
  235. -- rect: left=159 top=129 right=148 bottom=177
  236. -- title width / last selected line: 0
  237. -- icon id / first selected line: 0 / 0
  238. -- text alignment: 1
  239. -- font id: 0
  240. -- text size: 12
  241. -- style flags: 0
  242. -- line height: 16
  243. -- part name: u
  244.  
  245.  
  246. -- part 22 (button)
  247. -- low flags: 00
  248. -- high flags: 8002
  249. -- rect: left=179 top=129 right=148 bottom=197
  250. -- title width / last selected line: 0
  251. -- icon id / first selected line: 0 / 0
  252. -- text alignment: 1
  253. -- font id: 0
  254. -- text size: 12
  255. -- style flags: 0
  256. -- line height: 16
  257. -- part name: i
  258.  
  259.  
  260. -- part 23 (button)
  261. -- low flags: 00
  262. -- high flags: 8002
  263. -- rect: left=199 top=129 right=148 bottom=217
  264. -- title width / last selected line: 0
  265. -- icon id / first selected line: 0 / 0
  266. -- text alignment: 1
  267. -- font id: 0
  268. -- text size: 12
  269. -- style flags: 0
  270. -- line height: 16
  271. -- part name: o
  272.  
  273.  
  274. -- part 24 (button)
  275. -- low flags: 00
  276. -- high flags: 8002
  277. -- rect: left=219 top=129 right=148 bottom=237
  278. -- title width / last selected line: 0
  279. -- icon id / first selected line: 0 / 0
  280. -- text alignment: 1
  281. -- font id: 0
  282. -- text size: 12
  283. -- style flags: 0
  284. -- line height: 16
  285. -- part name: p
  286.  
  287.  
  288. -- part 25 (button)
  289. -- low flags: 00
  290. -- high flags: 8002
  291. -- rect: left=239 top=129 right=148 bottom=257
  292. -- title width / last selected line: 0
  293. -- icon id / first selected line: 0 / 0
  294. -- text alignment: 1
  295. -- font id: 0
  296. -- text size: 12
  297. -- style flags: 0
  298. -- line height: 16
  299. -- part name: [
  300.  
  301.  
  302. -- part 26 (button)
  303. -- low flags: 00
  304. -- high flags: 8002
  305. -- rect: left=58 top=171 right=190 bottom=76
  306. -- title width / last selected line: 0
  307. -- icon id / first selected line: 0 / 0
  308. -- text alignment: 1
  309. -- font id: 0
  310. -- text size: 12
  311. -- style flags: 0
  312. -- line height: 16
  313. -- part name: z
  314.  
  315.  
  316. -- part 27 (button)
  317. -- low flags: 00
  318. -- high flags: 8002
  319. -- rect: left=78 top=171 right=190 bottom=96
  320. -- title width / last selected line: 0
  321. -- icon id / first selected line: 0 / 0
  322. -- text alignment: 1
  323. -- font id: 0
  324. -- text size: 12
  325. -- style flags: 0
  326. -- line height: 16
  327. -- part name: x
  328.  
  329.  
  330. -- part 28 (button)
  331. -- low flags: 00
  332. -- high flags: 8002
  333. -- rect: left=98 top=171 right=190 bottom=116
  334. -- title width / last selected line: 0
  335. -- icon id / first selected line: 0 / 0
  336. -- text alignment: 1
  337. -- font id: 0
  338. -- text size: 12
  339. -- style flags: 0
  340. -- line height: 16
  341. -- part name: c
  342.  
  343.  
  344. -- part 29 (button)
  345. -- low flags: 00
  346. -- high flags: 8002
  347. -- rect: left=118 top=171 right=190 bottom=136
  348. -- title width / last selected line: 0
  349. -- icon id / first selected line: 0 / 0
  350. -- text alignment: 1
  351. -- font id: 0
  352. -- text size: 12
  353. -- style flags: 0
  354. -- line height: 16
  355. -- part name: v
  356.  
  357.  
  358. -- part 30 (button)
  359. -- low flags: 00
  360. -- high flags: 8002
  361. -- rect: left=138 top=171 right=190 bottom=156
  362. -- title width / last selected line: 0
  363. -- icon id / first selected line: 0 / 0
  364. -- text alignment: 1
  365. -- font id: 0
  366. -- text size: 12
  367. -- style flags: 0
  368. -- line height: 16
  369. -- part name: b
  370.  
  371.  
  372. -- part 31 (button)
  373. -- low flags: 00
  374. -- high flags: 8002
  375. -- rect: left=158 top=171 right=190 bottom=176
  376. -- title width / last selected line: 0
  377. -- icon id / first selected line: 0 / 0
  378. -- text alignment: 1
  379. -- font id: 0
  380. -- text size: 12
  381. -- style flags: 0
  382. -- line height: 16
  383. -- part name: n
  384.  
  385.  
  386. -- part 32 (button)
  387. -- low flags: 00
  388. -- high flags: 8002
  389. -- rect: left=178 top=171 right=190 bottom=196
  390. -- title width / last selected line: 0
  391. -- icon id / first selected line: 0 / 0
  392. -- text alignment: 1
  393. -- font id: 0
  394. -- text size: 12
  395. -- style flags: 0
  396. -- line height: 16
  397. -- part name: m
  398.  
  399.  
  400. -- part 33 (button)
  401. -- low flags: 00
  402. -- high flags: 8002
  403. -- rect: left=198 top=171 right=190 bottom=216
  404. -- title width / last selected line: 0
  405. -- icon id / first selected line: 0 / 0
  406. -- text alignment: 1
  407. -- font id: 0
  408. -- text size: 12
  409. -- style flags: 0
  410. -- line height: 16
  411. -- part name: ,
  412.  
  413.  
  414. -- part 34 (button)
  415. -- low flags: 00
  416. -- high flags: 8002
  417. -- rect: left=81 top=192 right=209 bottom=224
  418. -- title width / last selected line: 0
  419. -- icon id / first selected line: 0 / 0
  420. -- text alignment: 1
  421. -- font id: 0
  422. -- text size: 12
  423. -- style flags: 0
  424. -- line height: 16
  425. -- part name:  
  426.  
  427.  
  428. -- part 35 (button)
  429. -- low flags: 00
  430. -- high flags: 8002
  431. -- rect: left=218 top=171 right=190 bottom=236
  432. -- title width / last selected line: 0
  433. -- icon id / first selected line: 0 / 0
  434. -- text alignment: 1
  435. -- font id: 0
  436. -- text size: 12
  437. -- style flags: 0
  438. -- line height: 16
  439. -- part name: .
  440.  
  441.  
  442. -- part 36 (button)
  443. -- low flags: 00
  444. -- high flags: 8002
  445. -- rect: left=259 top=129 right=148 bottom=277
  446. -- title width / last selected line: 0
  447. -- icon id / first selected line: 0 / 0
  448. -- text alignment: 1
  449. -- font id: 0
  450. -- text size: 12
  451. -- style flags: 0
  452. -- line height: 16
  453. -- part name: ]
  454.  
  455.  
  456. -- part 37 (button)
  457. -- low flags: 00
  458. -- high flags: 8002
  459. -- rect: left=248 top=150 right=169 bottom=266
  460. -- title width / last selected line: 0
  461. -- icon id / first selected line: 0 / 0
  462. -- text alignment: 1
  463. -- font id: 0
  464. -- text size: 12
  465. -- style flags: 0
  466. -- line height: 16
  467. -- part name: '
  468.  
  469.  
  470. -- part 38 (button)
  471. -- low flags: 00
  472. -- high flags: 8002
  473. -- rect: left=238 top=171 right=190 bottom=256
  474. -- title width / last selected line: 0
  475. -- icon id / first selected line: 0 / 0
  476. -- text alignment: 1
  477. -- font id: 0
  478. -- text size: 12
  479. -- style flags: 0
  480. -- line height: 16
  481. -- part name: /
  482.  
  483.  
  484. -- part 55 (field)
  485. -- low flags: 00
  486. -- high flags: 0007
  487. -- rect: left=299 top=61 right=280 bottom=476
  488. -- title width / last selected line: 0
  489. -- icon id / first selected line: 0 / 0
  490. -- text alignment: 0
  491. -- font id: 3
  492. -- text size: 9
  493. -- style flags: 0
  494. -- line height: 12
  495. -- part name: 
  496.  
  497.  
  498. -- part 56 (button)
  499. -- low flags: 00
  500. -- high flags: A000
  501. -- rect: left=74 top=241 right=260 bottom=233
  502. -- title width / last selected line: 0
  503. -- icon id / first selected line: 0 / 0
  504. -- text alignment: 1
  505. -- font id: 0
  506. -- text size: 12
  507. -- style flags: 0
  508. -- line height: 16
  509. -- part name: Edit background script
  510. ----- HyperTalk script -----
  511. on mouseUp
  512.   edit script of background id 2753
  513. end mouseUp
  514.  
  515.  
  516.  
  517. -- part 57 (button)
  518. -- low flags: 00
  519. -- high flags: A000
  520. -- rect: left=93 top=263 right=282 bottom=217
  521. -- title width / last selected line: 0
  522. -- icon id / first selected line: 0 / 0
  523. -- text alignment: 1
  524. -- font id: 0
  525. -- text size: 12
  526. -- style flags: 0
  527. -- line height: 16
  528. -- part name: Edit stack script
  529. ----- HyperTalk script -----
  530. on mouseUp
  531.   edit script of stack "Key messages"
  532. end mouseUp
  533.  
  534.  
  535.  
  536. -- part contents for card part 55
  537. ----- text -----
  538. Key messages
  539. by David Bogartz
  540. 21 Oct 1987
  541.  
  542. This stack shows a quick and very dirty way to get HyperCard to send a message when the user presses a key (other than return, tab, and the arrow keys).  It doesn't work for number keys, and it probably isn't right for some applications, but it's simple and will probably work in many cases.
  543.  
  544. The basic idea is that there is an idle handler in the background script that looks in the message box and grabs whatever is there.  Then, for each keystroke, it 
  545. generates the event "key" with the char that the user pressed as a parameter. 
  546.  
  547. The trick is how to deal with the message box.  It looks like the message box is hidden, but in point of fact you can't have the message box hidden because (as far as I can tell) whenever you put something into the message box, HyperCard shows it.  So I have it visible, but offscreen.
  548.  
  549. The key-caps-like thing to the left is just a sample of what you can do with this technique.
  550.  
  551.  
  552.  
  553.  
  554.  
  555.